home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbevgfx2.zip
/
QBEVGFX.DOC
< prev
next >
Wrap
Text File
|
1992-03-21
|
20KB
|
568 lines
Shareware Documentation QB/EVGFX (C)1990 Cornel Huth
with minor changes 21-Mar-92 chh
Complete documentation is available with registration. See the
end of this document for complete ordering information.
Shareware, def. A try-before-you-buy marketing concept. It
relies on those that benefit from the product to pay for it. Go
ahead and try before you buy. If you can't use it, pass it
along, someone else may. If you can and do use it, pay for it.
What do you get for your money? Not only the legal continued use
of the product but you also get personal support from the author.
Need something changed for a particular need? Just ask. Try
that anywhere else. Just remember, this product is not free, so
if you use it please pay for it.
OVERVIEW
QB/EVGFX is a set of graphic routines for the EGA and VGA
assembled into a linkable LIB file. All routines have been
written in 8086 assembly and are self-contained. In other words,
even though QB/EVGFX has been designed for QuickBASIC 4.00+
compilers, QuickBASIC itself is not needed.
QB/EVGFX requires an EGA or VGA compatible video card with at
least 256K of RAM. It can be used in any native EGA and VGA mode
and also extended modes. All these routines will work on either
an EGA or VGA.
Accept the fact that these routines are for programmers.
Understand that this documentation is for programmers.
If you are not completely familiar with QB, BC, LINK and LIB, do
not fault this documentation. Consult the appropriate reference
or register this release to receive the 70-plus-page programmer
reference manual. The manual describes each routine completely
and offers ideas on how it, and QB/EVGFX, can best be used.
@@@@@@@@ Version 1.1 is the latest and greatest release of QB/EVGFX @@@@@@@@@@@
@ @
@ This shareware release you now have is 1.0, the original. Release 1.1 @
@ has a few more routines (like dithered windows), cleaned-up docs, better @
@ window parameters (x/y-size rather than end-points), more fonts (70+), @
@ pixel-precision windowed draw routines, and more I can't remember now. @
@ Release 1.0 was distributed through limited channels nearly 1 1/2 years @
@ ago. This re-release through PDN (thanks Erik! et. al) should result in a @
@ greater exposure and that's what shareware is all about. -- Granted, these @
@ docs in this shareware release won't make you an instant expert, but it sure@
@ should give you a good idea of what this package can do for you. To order @
@ your copy see the form at the end of this documentation and in !ORDER.FRM. @
@ @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
----------------------------------------------------------------
* Some routines require a variable-length string in DGROUP as a
* parameter. If you don't have this capability, see the section
* on simulating this data structure.
----------------------------------------------------------------
-----------------------
QB/EVGFX COMMAND SUMMARY
VIDEO CONTROL ROUTINES
DRAWING ROUTINES
FONTS
MISC ROUTINES
-------------------------------
VIDEO CONTROL ROUTINES include:
EGAVIDEO,VGAVIDEO,COLORVIDEO
SETMODE,SETMODEX,GETMODE
SETPSA,GETPSA
SETPALREG,SETPALETTE
SETSCNBUFF
BLANKSCN
BLINKBIT
WAITVS
FUNCTION EGAVIDEO%()
EGAVIDEO returns -1 if EGA video is supported, 0 if not.
Eg>IsEGA = EGAVIDEO
FUNCTION VGAVIDEO%()
VGAVIDEO returns -1 if VGA video is supported, 0 if not.
Eg>IsVGA = VGAVIDEO
FUNCTION COLORVIDEO%()
COLORVIDEO returns -1 if color video is supported, 0 if not.
Eg>IsColor = COLORVIDEO
SUB SETMODE(mode%)
SETMODE sets the computer's BIOS video to mode.
Normal EGA 640x350x16 graphics (QB SCREEN 9) is SETMODE 16.
Normal VGA 640x480x16 graphics (QB SCREEN 12) is SETMODE 18.
Eg>SETMODE &H10
SUB SETMODEX(regax%,regbx%)
SETMODEX is similar to SETMODEX but allows setting the computer's
BIOS mode to an extended mode. Most extended modes require only
the AL register, in which case SETMODE can be used. However,
some video adapter's extended modes need an additional register
to also be set (eg EVEREX). Consult your adapter manual.
Eg>SETMODEX &H0070,&H0
FUNCTION GETMODE%()
GETMODE returns the current BIOS video mode.
Eg>VMode = GETMODE
SUB SETPSA(onoff%)
SETPSA activates/deactivates the palette save area.
SETPSA 1 activates the BIOS palette save area. Any future
changes in the palette will be stored there for later recall.
SETPSA 0 deactivates the BIOS palette save area. If you activate
the PSA in your program you MUST deactivate it before the program
ends.
Eg>SETPSA 1
SUB GETPSA(pal17$)
GETPSA returns a table of palette values and border color. The
variable pal17$ is a variable length string in DGROUP. The first
byte of pal17$ returned is the color value for attribute 0,
second byte is attribute 1, and so on. Byte 17 of pal17$ is the
color border value. This routine should only be used if there is
an active palette save area (SETPSA 1).
Eg>GETPSA pal17$
SUB SETPALREG(reg%,colorval%)
SETPALREG sets one of the palette registers. Attribute 0 is
controlled by register 0, attribute 1 by register 1...up to
register 17 which is the border color. Colorval is any color
value between 0 and 63.
Eg>SETPALREG 8,&H37
SUB SETPALETTE(pal17$)
SETPALETTE sets all 16 palette registers and the border with a
single call. The variable pal17$ is a variable length string in
DGROUP. The first byte of pal17$ is the color value for
attribute 0, second byte is attribute 1, and so on. Byte 17 of
pal17$ is the border color value.
Eg>SETPALETTE pal17$
SETSCNBUFF(x1%,y1%)
SETSCNBUFF set the logical dimensions of the video display
buffer. This should be done after every video mode change.
Standard dimensions are x1%=640, y1%=350 for EGA mode 16,
x1%=640,y1%=480 for VGA mode 18.
Eg>SETMODE &H12
Eg>SETSCNBUFF 640,480
BLANKSCN(onoff%)
BLANKSCN turns the video system on or off.
BLANKSCN 1 turns the video off.
BLANKSCN 0 turns the video back on.
Eg>BLANKSCN 1
BLINKBIT(onoff%)
BLINKBIT allows selecting either 16 possible background values or
8 background values and 8 blinking. The palette needs to be
adjusted on the EGA before using BLINKBIT 1.
Eg>BLINKBIT 1
WAITVS(count%)
WAITVS waits for count% vertical sync signals. In EGA mode 16
and VGA mode 18 a vert sync is at least 1/60th of a second.
Eg>WAITVS 1
-------------------------
DRAWING ROUTINES include:
READDOT,DRAWDOT
DRAWCH
SETSTEP,GETSTEP
DRAWLN,DRAWLNP,DRAWLNS
DRAWSTR
DRAWELL
FILLSCN,FILLAREA,FILLAREAP,FLUDAREA,FLUDAREAP
DIMBLOCK,GETBLOCK,PUTBLOCK
The x and y coordinates are screen coordinates with 0,0 at the
upper-left of the screen. x runs across, y runs down.
The value is an attribute value, 0 to 15. Eg, using a value of 7
would use the color value in attribute register 7.
The mode is the method used when updating the pixels. A mode=0
replaces the pixels, mode=8 ANDs the pixels, mode=16 ORs the
pixels, and mode=24 XORs the pixels.
FUNCTION READDOT%(x0%,y0%)
READDOT returns the value of the pixel at position x0,y0.
Eg>dot = READDOT(320,175)
SUB DRAWDOT(mode%,value%,x0%,y0%)
DRAWDOT sets the pixel by mode at position x0,y0 to value.
Eg>DRAWDOT 0,7,320,175
SUB DRAWCH(mode%,char%,x0%,y0%,fg%,bg%)
DRAWCH draws ASCII char by mode at position x0,y0 in foreground
value fg, background bg.
Eg>DRAWCH 0,65,0,0,7,0
SUB DRAWLN(mode%,value%,x0%,y0%,x1%,y1%)
DRAWLN draws a line by mode from x0,y0 to x1,y1 in value.
Eg>DRAWLN 0,7,0,0,639,349
SUB DRAWLNP(mode%,pattern$,x0%,y0%,x1%,y1%)
DRAWLNP draws a line by mode from x0,y0 to x1,y1 using the
pattern pattern$. The first byte of pattern$ is to be the shift
count, the other bytes are the attribute values to use as the
pattern. Though not all that useful in DRAWLNP, the shift count
lets you fill with diagonal pattern